package com.eventx.service.def;

import com.eventx.bus.event.EventPublish;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

/**
 * @author: anrror
 **/
public class DefaultEventPublish extends EventPublish {

    DefaultEventSource defaultEventSource ;
    public DefaultEventPublish(DefaultEventSource defaultEventSource, DefaultChannelProvider defaultChannelProvider) {
        super(defaultChannelProvider);
        this.defaultEventSource = defaultEventSource;
    }

    @Override
    public void publishMessage() {
        defaultEventSource.send(getEventName(),getMessageData());
    }

}
